package com.ts.util;

import java.lang.reflect.Method;

public class EntityUtil {
    public static String getTypeByFieldName(Class c,String field){
        String result = "";
        String method = "get" + StringsUtil.upperCase(field);
        try {
            Method declaredMethod = c.getDeclaredMethod(method);
            result = declaredMethod.getReturnType().getSimpleName();
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        }
        return result;
    }
}
